home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
newsgrp
/
group01a.txt
/
000040_icon-group-sender _Tue May 30 17:06:44 2000.msg
< prev
next >
Wrap
Internet Message Format
|
2002-01-03
|
2KB
Return-Path: <icon-group-sender>
Received: (from root@localhost)
by baskerville.CS.Arizona.EDU (8.9.1a/8.9.1) id RAA28345
for icon-group-addresses; Tue, 30 May 2000 17:06:32 -0700 (MST)
Message-Id: <200005310006.RAA28345@baskerville.CS.Arizona.EDU>
Date: Tue, 30 May 2000 13:40:37 -0700
From: Steve Wampler <swampler@noao.edu>
X-Accept-Language: en
To: icon-group <icon-group@optima.CS.Arizona.EDU>
Subject: Re: CODE() and @/2
Errors-To: icon-group-errors@optima.CS.Arizona.EDU
Status: RO
Content-Length: 1611
"F.G. van DORP" wrote:
> I tried
>
> nextLabel := create "L" || (1 to 10) || ("foo" @ &source)
What did you intend the above to do? I'm confused as to why you
have the ("foo" @ &source) there. If all you want are labels Lxfoo,
where x is replaced by 1 to 10, you should use
nextLabel := create "L" || (1 to 10) || "foo"
> write(@nextlabel)
This must have been write(@nextLabel), right?
> ....
>
> and to my very surprise it did act as a regular RETURN (no
> ASSEMBLER jargon necessary after all), writing
>
> L1foo
> ....
I don't see how the co-expression you've given would produce the above,
are you sure that isn't the output from some other try?
In fact, I would expect to see "foo" printed by itself first, followed
by a "string expected, offending value: &null" error if you activate
nextLabel a second time without passing a value to it...
Try the following sample program:
procedure main()
nextLabel := create "L" || (1 to 10) || "foo"
write("Label 1 is ", @nextLabel)
write("Label 2 is ", @nextLabel)
write("Label 3 is ", @nextLabel)
write("Label 4 is ", @nextLabel)
write("Label 5 is ", @nextLabel)
every write("Label ",6 to 10," is ",@nextLabel)
end
You should see the output:
Label 1 is L1foo
Label 2 is L2foo
Label 3 is L3foo
Label 4 is L4foo
Label 5 is L5foo
Label 6 is L6foo
Label 7 is L7foo
Label 8 is L8foo
Label 9 is L9foo
Label 10 is L10foo
--
Steve Wampler- SOLIS Project, National Solar Observatory
swampler@noao.edu